package com.petadoption.serverclient.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.petadoption.serverclient.entity.Images;
import com.petadoption.serverclient.mapper.ImagesMapper;
import com.petadoption.serverclient.service.IImagesService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ImagesServiceImpl extends ServiceImpl<ImagesMapper, Images> implements IImagesService {

    @Resource
    private ImagesMapper imagesMapper;

    @Override
    public Images findImageByName(String name) {
        QueryWrapper<Images> queryWrapper = new QueryWrapper<Images>().eq("images_name", name);
        return imagesMapper.selectOne(queryWrapper);
    }
}
